home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / wardial.arc / SEND_ASC.PAS < prev    next >
Pascal/Delphi Source File  |  1986-04-30  |  2KB  |  81 lines

  1. Procedure Send_asc;
  2. var a:char;
  3.     infile:text;
  4.     file_name:string[20];
  5.     ok,go_back:boolean;
  6. begin
  7.   xcoord:=wherex;
  8.   go_back:=false;
  9.   ycoord:=wherey;
  10.   Move(screen1,screen2,4000);
  11.   Normvideo;
  12.   lowvideo;
  13.   Window(1,1,80,21);
  14.   normvideo;
  15.   textcolor(cyan);
  16.   frame(14, 5,36,11);
  17.   lowvideo;
  18.   window(15,6,35,10);
  19.   repeat
  20.      clrscr;
  21.      gotoxy(1,1);
  22.      textcolor(white);
  23.      writeln('  Send File (Ascii)');
  24.      beep;
  25.      textcolor(7);
  26.      writeln;
  27.      Writeln(' Enter File Name ');write(' > ');
  28.      Readln(File_name);
  29.      if length(file_name) > 0 then
  30.      begin
  31.      assign(infile, file_name);
  32.      {$I-} Reset(infile) {$I+};
  33.      ok:=(IOResult=0);
  34.      end else
  35.             begin
  36.             go_back:=true;
  37.             ok:=true;
  38.             end;
  39.      if not ok then writeln('File Not found');
  40.      delay(2000);
  41.   until ok;
  42.   if not go_back then
  43.   begin
  44.   normvideo;
  45.   move(screen2,screen1,4000);
  46.   lowvideo;
  47.   Window(1,1,80,21);
  48.   gotoxy(1,1);
  49.   insline;
  50.   textcolor(white+blink);
  51.   write(chr(16):35);
  52.   textcolor(7);
  53.   write(' SEND FILE ');
  54.   textcolor(white+blink);
  55.   writeln(chr(17));
  56.   normvideo;
  57.   lowvideo;
  58.   window(1,2,80,21);
  59.   ClrScr;
  60.   gotoxy(1,21);
  61.   textcolor(maincolor);
  62.   repeat
  63.      read(infile,a);
  64.      write(a);
  65.      write_byte(a);
  66.   until eof(infile);
  67.   writeln;writeln;writeln('DONE.');
  68.   delay(2000);beep;beep;
  69.   end;
  70.   normvideo;
  71.   move(screen2,screen1,4000);
  72.   lowvideo;
  73.   window(1,1,80,21);
  74.   textcolor(maincolor);
  75.   gotoxy(xcoord,ycoord);
  76.  end;
  77.  
  78.  
  79.  
  80.  
  81.